if not vim.fn.has('nvim-0.5') == 1 then
    error('This config requires Neovim >= v0.5.0')
end

require('plugins') -- Load my plugins.lua file
require('editor') -- load my editor.lua file
require('keybinds') -- load my keybinds.lua file
require('statusbar') -- load my statusbar.lua file

-- vim.o: general options
-- vim.wo: window specific options
-- vim.bo: buffer specific options
-- vim.g: global options
-- vim.opt: set all options for that variable
-- vim.env: set and enviroment variable
-- use :h to find out what option to use
local set = vim.opt
local let = vim.g

-- set.syntax = true -- Enable syntax highlighting, disable as it conflict with other plugins
set.fillchars="eob: " -- Remove ~ on empty lines
set.termguicolors=false -- Enable 24-bit rgb, messes up wal.vim
set.encoding="UTF-8" -- Enable unicode encoding
set.clipboard='unnamedplus' -- Use system clipboard
set.wrap = false -- Disable line wrap
set.wrap = false -- Disable line wrap
set.undofile = true -- Create an undo file to undo across instances
set.smartcase = true -- Enable case sensitive searching
set.backup = false -- Creates backup files
set.incsearch = true -- Incremental search, match as you type the search
set.completeopt = 'menuone,noinsert,noselect' -- Completion method
set.ruler = true -- Show line num and column of cursor
set.number = true -- Enable line numbers
set.signcolumn = 'number' -- What to display in the sign column
set.tabstop = 4 -- How many spaces should <Tab> be
set.shiftwidth = 4 -- Number of spaces a tab is
set.mouse = 'nvic' -- Enable mouse support in n,v,i,c buffers
set.smartindent = true -- Auto indent, disables when cindent is enabled
set.cindent = true -- Auto indenting in C programming
set.expandtab = true -- Insert shiftwidth number of spaces
set.guifont="JetBrainsMonoNerdFont" -- Set font, other fonts: "GoMonoNerdFont", "JetBrainsMonoNerdFont", "FiraCodeNerdFont"
-- set.filetype.indent = true -- what is this?
-- set.filetype.plugin.indent = true -- what is this?
-- set.swapfile = false -- Creates a temp file to store session data, eases memory?
set.hidden = true -- Can buffers cover other buffers
vim.cmd("colorscheme wal")

-- Auto commands
vim.api.nvim_command('autocmd VimEnter * :ColorHighlight .')
vim.api.nvim_command('autocmd FileType * setlocal nofoldenable')

-- Fzf config
let.fzf_layout = { 
	window = { 
		width = 0.8, 
		height = 0.8
	} 
}
vim.env.FZF_DEFAULT_OPTS='--reverse'

--[[
local org = require('orgmode')
org.setup({
  org_agenda_files = {'~/Dropbox/org/*', '~/my-orgs/**/*'},
  org_default_notes_file = '~/Dropbox/org/refile.org',
})
]]
